﻿@using Microsoft.AspNet.Identity

<!DOCTYPE html>
<html>
<head>
    <meta name="Robots" content="all">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="content-Language" content="fr">
    <meta name="description" content="Site des anciens de Charles de Foucauld CASABLANCA MAROC">
    <meta name="keywords" content="ecole,charles,foucauld,anciens,casablanca,maroc,casa,casablanca,foot,hand,jose,alvarez,personnel,asp.net,mvc">
    <meta name="subject" content="Association anciens eleves">
    <meta name="copyright" content="ACDF">
    <meta name="author" content="Jose ALVAREZ">
    <meta name="publisher" content="ACDF - Jose ALVAREZ">
    <meta name="identifier-Url" content="http://jowalva.ddns.net/ACDF">
    <meta name="reply-To" content="foucauld.casa@live.fr">
    <meta name="revisit-After" content="1 day">
    <meta name="rating" content="general">
    <meta name="distribution" content="global">
    <meta name="geography" content="Nancy,France,54000">
    <meta name="category" content="internet">
    <!-- Adding a RenderSection here, mark it as not required-->
    @RenderSection("AdditionalMeta", false)
    <title>@ViewBag.Title - ACDF</title>
    @Styles.Render("~/Content/css")
    @Scripts.Render("~/bundles/modernizr")
    <!-- Google Analytics BEGIN -->
    <script>
        (function (i, s, o, g, r, a, m) {
            i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
                (i[r].q = i[r].q || []).push(arguments)
            }, i[r].l = 1 * new Date(); a = s.createElement(o),
            m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
        })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
        ga('create', 'UA-48859953-1', 'jow-alva.net');
        ga('send', 'pageview');
    </script><!-- Google Analytics END -->
    <!-- AddThis Button BEGIN -->
    <script type="text/javascript">
        var addthis_config = {
            data_ga_property: 'UA-48859953-1',
            data_ga_social: true
        };
    </script><!-- AddThis Button END -->
    <link rel="icon" href="@Url.Content("~/favicon.ico")" />
</head>
<body>
    <!-- /div-wrapper -->
    <div id="wrapper">

        <!-- Navigation -->
        <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
            <!-- /.navbar-header -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a href="~/Home" title="HOME - ACDF-Casablanca-Maroc"><img id="NavBarBrandImage" class="navbar-brand"  alt="Home" src="~/Content/images/Tramp50.png" > 
                    <span class="navbar-brand hidden-xs" style="font-size:large">Anciens de Charles de Foucauld</span>
                    <span class="navbar-brand visible-xs" style="font-size:small">Anciens de Charles de Foucauld</span>           
                </a>
            </div><!-- /.navbar-header -->
            <!-- /.navbar-top-links -->
            <ul class="nav navbar-top-links navbar-right">
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-question-circle fa-fw"></i>  <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-messages">
                        <li>@Html.ActionLink("Contact", "Contact", "Home")</li>
                        <li class="divider"></li>
                        <li>@Html.ActionLink("About", "About", "Home")</li>
                        @if (User.IsInRole("Admin"))
                        {
                            <li class="divider"></li>
                            <li>@Html.ActionLink("Manage photo category", "Index", "Category")</li>
                            <li>@Html.ActionLink("Manage photo subcategory", "Index", "SubCategory")</li>
                            <li class="divider"></li>
                            <li>@Html.ActionLink("RolesAdmin", "Index", "RolesAdmin")</li>
                            <li>@Html.ActionLink("UsersAdmin", "Index", "UsersAdmin")</li>
                        }
                    </ul><!-- /.dropdown-messages -->

                </li>

                <li><a href="/p-jalvarez/foucauld/" target="_blank" title="OLD ACDF Site"><i class="fa fa-external-link"></i></a></li>

                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#" title="Login/Logout User profile">
                        @if (Request.IsAuthenticated)
                        {
                            // - [10003] use Pseudo as ViewName, UserName is ReadOnly
                            // http://www.itorian.com/2013/11/customize-users-profile-in-aspnet.html
                            var userManager = new UserManager<Ja.Mvc.Acdf.Models.ApplicationUser>
                                (new Microsoft.AspNet.Identity.EntityFramework.UserStore<Ja.Mvc.Acdf.Models.ApplicationUser>
                                (new Ja.Mvc.Acdf.Models.ApplicationDbContext()));

                            // Get the current logged in User and look up the user in ASP.NET Identity
                            var currentUser = userManager.FindById(User.Identity.GetUserId());
                            // - [10010] - ADD: Avatar in _LoginPartial
                            // - [10015] - MODIF: _LoginPartial and _Layout
                            var image = "";

                            if (currentUser.AvatarUrl != null)
                            {
                                image = currentUser.AvatarUrl;
                            }
                            else
                            {
                                image = "~/Content/Avatars/BlankPhoto.jpg";
                            }

                            @currentUser.Pseudo <img id="login_photo" class="img-circle" style="float: left; padding-right:5px" height="35" width="35" src="@Url.Content(@image)" />
                        }
                        else
                        {
                            <i class="fa fa-user fa-fw"></i>
                        }
                        <i class="fa fa-caret-down"></i>

                    </a>
                    <ul class="dropdown-menu dropdown-user">
                        <li>
                            @Html.Partial("_LoginPartial")
                        </li>
                    </ul>
                </li><!-- /.dropdown-user -->

                <li>@MyRazorHelpers.AddThis()</li>
            </ul><!-- /.navbar-top-links -->

            <!-- /.navbar-collapse sidebar-nav -->
            <div class="navbar-collapse sidebar-nav">
                <div class="navbar-default sidebar" role="navigation">
                    <ul class="nav" id="side-menu">
                        <li>
                            <a href="#"><i class="fa fa-bar-chart-o fa-fw"></i> Medias<span class="fa arrow"></span></a>
                            <ul class="nav nav-second-level">
                                <li class="nav-header"><i class="fa fa-picture-o"></i> Photos</li>
                                <li>@Html.ActionLink("Photos (Paged)", "Index", "Photo")</li>
                                <li>@Html.ActionLink("Photos (Gallery)", "Category", "Photo")</li>
                                <li>@Html.ActionLink("Photos (Last five)", "RecentPhoto", "Photo")</li>
                                <li class="divider"></li>
                                <li class="nav-header"><i class="fa fa-video-camera"></i> Videos</li>
                                <li>@Html.ActionLink("Videos", "Index", "Video")</li>
                                <li><a href="http://www.dailymotion.com/group/ACDF" target="_blank">ACDF sur DailyMotion <i class="fa fa-external-link"></i></a></li>
                            </ul>
                            <!-- /.nav-second-level -->
                        </li>
                        <li>
                            <a href="#"><i class="fa fa-file-text fa-fw"></i> Documents<span class="fa arrow"></span></a>
                            <ul class="nav nav-second-level">
                                <li>@Html.ActionLink("Logos Tramp", "Index", "Tramp")</li>
                                <li>@Html.ActionLink("Anecdotes", "Index", "Anecdote")</li>
                                <li class="nav-header"><i class="fa fa-files-o"></i> Documents PDF-DOC-PPT</li>
                                <li>@Html.ActionLink("Divers", "Index", "PdfViewer")</li>
                                <li class="nav-header"><i class="fa fa-file-text"></i> Archives</li>
                                <li>@Html.ActionLink("Archives", "Index", "Archive")</li>
                            </ul>
                            <!-- /.nav-second-level -->
                        </li>
                        <li>
                            <a href="#"><i class="fa fa-sitemap fa-fw"></i> Réseau<span class="fa arrow"></span></a>
                            <ul class="nav nav-second-level">
                                <li class="nav-header"><i class="fa fa-users"></i> Livre d'or</li>
                                <li>
                                    @*<a href="@Url.Action("Index", "GuessBook")"><span>Livre d'or</span><span class="badge pull-right">@JA.Helpers.Utils.GetGlobalValue(this.Context, "CountAcdfGuessBooks")</span></a>*@
                                    <a href="@Url.Action("Index", "GuessBook")"><span>Livre d'or</span><span class="badge pull-right">@ViewBag.CountAcdfGuessBooks</span></a>
                                </li>
                                <li class="nav-header"><i class="fa fa-users"></i> Rencontres</li>
                                <li>@Html.ActionLink("Rencontres", "Index", "Rencontre")</li>
                            </ul>
                            <!-- /.nav-second-level -->
                        </li>
                        <li>
                            @*<a href="@Url.Action("Create", "GuessBook")"><span><i class="fa fa-sign-in"></i> Signer le livre d'or</span><span class="badge pull-right">@JA.Helpers.Utils.GetGlobalValue(this.Context, "CountAcdfGuessBooks")</span></a>*@
                            <a href="@Url.Action("Create", "GuessBook")"><span><i class="fa fa-lock"></i> Signer le livre d'or</span><span class="badge pull-right">@ViewBag.CountAcdfGuessBooks</span></a>
                        </li>
                        <li>
                            @*<a href="@Url.Action("RestrictedUsersList", "Account")"><i class="fa fa-list"></i> <span>Liste des membres</span><span class="badge pull-right">@JA.Helpers.Utils.GetGlobalValue(this.Context, "CountAspNetUsers")</span></a>*@
                            <a href="@Url.Action("RestrictedUsersList", "Account")"><i class="fa fa-lock"></i> <span>Liste des membres</span><span class="badge pull-right">@ViewBag.CountAspNetUsers</span></a>
                        </li>
                        <li>
                            <a href="https://acdfcasaV2.codeplex.com/" target="_blank"><i class="fa fa-code"></i> <span>Source CodePlex</span> <i class="fa fa-external-link"></i></a>
                        </li>
                        <li>
                            <a href="~/ReadMe.txt" target="_blank"><i class="fa fa-code"></i> <span>Changeset</span> <i class="fa fa-external-link"></i></a>
                        </li>
                    </ul><!-- /#side-menu -->                    
                </div><!-- /.navbar-collapse sidebar-nav -->
            </div>
        </nav><!-- /Navigation -->
        <!-- /page-wrapper -->
        <div id="page-wrapper" >
            @RenderBody()
            @MyRazorHelpers.FixTab()
            @MyRazorHelpers.FixTabTop()
        </div><!-- /page-wrapper -->
        <!-- /footer -->
        <footer>
                @MyRazorHelpers.FooterInformations()
        </footer><!-- /footer -->

    </div><!-- /div-wrapper -->
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    @RenderSection("scripts", required: false)

    <!-- GO TOP -->
    <script>
        $(document).ready(function () {

            // hide #back-top first
            $("#back-top").hide();

            // fade in #back-top
            $(function () {
                $(window).scroll(function () {
                    if ($(this).scrollTop() > 100) {
                        $('#back-top').fadeIn();
                    } else {
                        $('#back-top').fadeOut();
                    }
                });

                // scroll body to 0px on click
                $('#back-top a').click(function () {
                    $('body,html').animate({
                        scrollTop: 0
                    }, 800);
                    return false;
                });
            });

        });
    </script><!-- GO TOP END -->

</body>
</html>
